package cn.edu.cug.cs.gtl;

import cn.edu.cug.cs.gtl.io.File;

import java.util.ArrayList;
import java.util.List;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        String rootDir = "src/main/java/cn/edu/cug/cs/gtl/docdb/core";
        File rootFile = new File(rootDir);
        List<File> files = new ArrayList<>();
        List<File> dirs = new ArrayList<>();
        java.io.File [] files1 = rootFile.listFiles(f->f.isFile());
        java.io.File [] dirs1 = rootFile.listFiles(f->f.isDirectory());
        for(java.io.File f: files1){
            files.add(new File(f.getAbsolutePath()));
        }
        for(java.io.File f: dirs1){
            dirs.add(new File(f.getAbsolutePath()));
        }
        String [] sa = rootFile.split();
        String rootName = sa[sa.length-1];
        for(File s : files){
            System.out.println(s.getAbsolutePath());
        }
        for(File s : dirs){
            System.out.println(s.getAbsolutePath());
        }
    }
}
